package lfp.simple;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

import lfp.addressselector.AddressSelectorHelper;


public class MainActivity extends AppCompatActivity {
    private static final int RESULT_CODE = 3423;

    TextView tv_Info;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tv_Info = (TextView) findViewById(R.id.view_Info);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == RESULT_CODE) {
            if (resultCode == RESULT_OK) {
                tv_Info.setText("选择地址");
            }
        }
    }

    public void onSelecte(View v) {
        AddressSelectorHelper.ChooseAddr(this, RESULT_CODE);
    }
}
